<?php
function getEolinTagSearch($target, $mother) {
	global $entries, $defaultURL, $pluginURL, $configVal;

	requireComponent('Textcube.Function.misc');
	$data = misc::fetchConfigVal($configVal);
	$eolinIMG		= "eolintagsearch.gif";			$e_title = "이올린 태그검색";
	$allblogIMG		= "allblogtagsearch.gif";		$a_title = "올블로그 태그검색";
	$technoratiIMG	= "technoratitagsearch.gif";	$t_title = "테크노라티 태그검색";
	$tagstoryIMG	= "tagstorytagsearch.gif";		$tg_title = "태그스토리 태그검색";
	$tistoryIMG		= "tistorytagsearch.gif";		$bp_title = "티스토리 태그검색";
	if(isset($mother) && isset($target)){
		$tempTagArr = array();
		foreach($target as $tag => $tagLink) {
			$tempTagArr[$tag] = $tagLink.
				(($data['c1']==1)?"<a href=\"http://eolin.com/tag/".encodeURL($tag)."\" target=\"_blank\" onfocus=\"this.blur()\" title=\"{$e_title}\"><img src=\"{$pluginURL}/images/{$eolinIMG}\" border=\"0\" align=\"top\" alt=\"{$e_title}\" /></a>":"").
				(($data['c2']==1)?"<a href=\"http://tags.allblog.net/".rawurlencode($tag)."/\" target=\"_blank\" onfocus=\"this.blur()\" title=\"{$a_title}\"><img src=\"{$pluginURL}/images/{$allblogIMG}\" border=\"0\" align=\"top\" alt=\"{$a_title}\" /></a>":"").
				(($data['c3']==1)?"<a href=\"http://www.technorati.com/tag/".rawurlencode($tag)."\" target=\"_blank\" onfocus=\"this.blur()\" title=\"{$t_title}\"><img src=\"{$pluginURL}/images/{$technoratiIMG}\" border=\"0\" align=\"top\" alt=\"{$t_title}\" /></a>":"").
				(($data['c4']==1)?"<a href=\"http://www.tagstory.com/video/video_tag.aspx?tag=".tagEncoding($tag)."\" target=\"_blank\" onfocus=\"this.blur()\" title=\"{$tg_title}\"><img src=\"{$pluginURL}/images/{$tagstoryIMG}\" border=\"0\" align=\"top\" alt=\"{$tg_title}\" /></a>":"").
				(($data['c5']==1)?"<a href=\"http://www.tistory.com/search/tag/".encodeURL($tag)."\" target=\"_blank\" onfocus=\"this.blur()\" title=\"{$bp_title}\"><img src=\"{$pluginURL}/images/{$tistoryIMG}\" border=\"0\" align=\"top\" alt=\"{$bp_title}\" /></a>":"");		
		}
		$target = $tempTagArr;
	}
	return $target;
}
function tagEncoding($str){
	$target = rawurlencode(iconv("UTF-8", "EUC-KR" ,$str)); 
	return $target;
}

function TagSearch_DataSet($DATA){
	requireComponent('Textcube.Function.misc');
	$cfg = misc::fetchConfigVal($DATA);
	return true;
}
?>
